package com.example.administrator.szb.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.administrator.szb.R;
import com.example.administrator.szb.activity.base.BasePresenter;
import com.example.administrator.szb.activity.base.MVPBaseActivity;

public class ShouCangTmp extends MVPBaseActivity implements View.OnClickListener{

    private LinearLayout xiangmu;
    private LinearLayout wenda;
    private LinearLayout jigou;
    private LinearLayout zixun;
    private LinearLayout service;
    private LinearLayout anli;
    private TextView textView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shou_cang_tmp);
    }

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }

    @Override
    protected void initView() {
        textView = findViewById(R.id.bar_title);
        textView.setText("收藏管理");
        xiangmu = (LinearLayout) findViewById(R.id.xiangmu);
        wenda = (LinearLayout) findViewById(R.id.wenda);
        jigou = (LinearLayout) findViewById(R.id.jigou);
        zixun = (LinearLayout) findViewById(R.id.zixun);
        service = (LinearLayout) findViewById(R.id.service);
        anli = (LinearLayout) findViewById(R.id.anli);
    }


    @Override
    protected void initEvent() {
        xiangmu.setOnClickListener(this);
        wenda.setOnClickListener(this);
        jigou.setOnClickListener(this);
        zixun.setOnClickListener(this);
        service.setOnClickListener(this);
        anli.setOnClickListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent(this,ShouCangActivity.class);
        int type = 0;
        switch (v.getId()){
            case R.id.xiangmu:
                type=0;
                break;
            case R.id.wenda:
                type=1;
                break;
            case R.id.jigou:

                type=2;
                break;
            case R.id.zixun:

                type=3;
                break;
            case R.id.service:

                type=4;
                break;
            case R.id.anli:

                type=5;
               break;
        }
        intent.putExtra("type",type);
        startActivity(intent);
    }
}
